import pytest
from selenium import webdriver
from time import sleep

@pytest.fixture()
def driver():
    browser = webdriver.Chrome()
    browser.get('http://47.99.66.20:8899/admin/login')
    browser.maximize_window()
    yield browser
    sleep(5)
    browser.quit()      # 退出浏览器
    # browser.close()     # 退出当前句柄